x86: don't deliver NMI to PVH Dom0
authorJan Beulich <JBeulich@suse.com>
Thu, 11 Dec 2014 10:47:21 +0000 (10:47 +0000)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 5 Jan 2015 15:13:53 +0000 (10:13 -0500)
commit21c9fce8efbf407dc5d6bcc78bf65a1402623db9
tree16a40f82bae9f05f9384db2993adeeb56945041a
parent36174af3fbeb1b662c0eadbfa193e77f68cc955b
x86: don't deliver NMI to PVH Dom0

... for the time being: The mechanism used depends on the domain's use
of the IRET hypercall - which PVH is not using.  HVM code (which PVH
uses) will deliver an NMI if it sees v->nmi_pending however that
temporary affinity adjustment gets undone in the HYPERVISOR_iret
handler, yet PVH can't call that hypercall.

Also drop two bogus code lines spotted while going through the involved
code paths: Addresses of per-CPU variables can't possibly be NULL, and
the setting of st->vcpu in send_guest_trap()'s MCE case is redundant
with an earlier cmpxchgptr().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
xen/arch/x86/traps.c